<template>
  <!--这是一个假的搜索框,点击之后会进入搜索页面路由再进行搜索-->
  <div @click="$router.push('search')">
    <van-search
      :background="props.bgc"
      :placeholder="props.placeholder ? props.placeholder : '请输入搜索关键词'"
      shape="round"
      show-action
    >
      <template #action>
        <slot></slot>
      </template>
    </van-search>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";

const props = defineProps(["bgc", "placeholder"]);
</script>
